import java.util.*;
/*给你两个非负整数 low 和 high 。请你返回 low 和 high 之间（包括二者）奇数的数目。
输入：low = 3, high = 7
输出：3*/
public class Main {
    public static int seek(int low, int high) {
        int count = 0;
        if (low % 2 != 0) count++;
        if (high % 2 != 0) count++;
        if (count == 2) {
            count += ((high - low) / 2 - 1);
        } else if (count <= 1) {
            count += ((high - low) / 2);
        } else {
            count += 0;
        }
        return count;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int low = sc.nextInt();
        int high = sc.nextInt();
        int co = seek(low, high);
        System.out.println(co);
    }
}